<template>
<div>
<h1>这个分类下所有的商品</h1>
  <table>
    <tr>
      <td>商品</td>
      <td>分类</td>
    </tr>
    <tr v-for="i in list">
      <td>{{i.name}}</td>
      <td>
       {{i.fenlei}}
      </td>
    </tr>
  </table>


</div>
</template>

<script>
export default {
  name: "p6_goods2",
  data(){
    return{
      id : this.$route.query.id,
      list:[]
    }
  },
  methods:{
    get(){
      this.$axios.get('users/Sfenlei_API/?id='+this.id)
      .then(i=>{
        this.list = i.data.list
      })
    }
  },
  mounted() {
    this.get()
  }
}
</script>

<style scoped>

</style>
